package com.demo.rigistry.interceptor.myinterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

public class PermissionsInterceptor implements HandlerInterceptor {
	@Override
	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object arg,
			Exception exception) throws Exception {

		System.out.println("PermissionsInterceptor afterCompletion");

	}

	@Override
	public void postHandle(HttpServletRequest request, HttpServletResponse response, Object arg,
			ModelAndView modelAndView) throws Exception {

		System.out.println("PermissionsInterceptor postHandle");

	}

	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object arg) throws Exception {

		System.out.println("PermissionsInterceptor preHandle");
		return true;

	}
}
